package com.doit.day01;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class _02_redis客户端的连接 {
    public static void main(String[] args) {
        //第一种，创建jedis的对象
        Jedis jedis = new Jedis("linux01",6379);

        String ping = jedis.ping();
        System.out.println(ping);

        JedisPool jedisPoll = new JedisPool("linux01",6379);
        Jedis jedis1 = jedisPoll.getResource();
        String ping1 = jedis1.ping();
        System.out.println(ping1);

    }
}
